package com.eesujie.xcs.common;

import com.eesujie.xcs.entity.vo.UserVO;

public class UserContext {
    private static final ThreadLocal<UserVO> context = new ThreadLocal<>();

    public static void setUserVO(UserVO userVO) {
        context.set(userVO);
    }

    public static Long getUserId() {
        return context.get().getId();
    }

    public static void remove() {
        context.remove();
    }
}
